package com.example.spring_boot_demo.controller;

import com.example.spring_boot_demo.dto.GoodsRequest;
import com.example.spring_boot_demo.log.annotation.Log;
import com.example.spring_boot_demo.service.CategoryService;
import com.example.spring_boot_demo.service.GoodsService;
import com.example.spring_boot_demo.utils.AjaxResult;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <P> @Author: SongKeCheng
 * <P> Type: Class
 * <P> Description: 分类控制器
 * <P> Date: 2024/5/29:19:44
 */

@SuppressWarnings({"unchecked", ""})
@RestController
@RequestMapping("category")
public class CategoryController {
    private static final Logger log = LoggerFactory.getLogger(CategoryController.class);


    @Autowired
    private CategoryService categoryService;

    /**
     * 统计商品的分类
    */
    //@Log(title = "统计商品的分类",funcName = "statisticsCategory" )
    @GetMapping("/statisticsCategory")
    public AjaxResult statisticsCategory(Integer id){
        //int i =1/0;
        return categoryService.statisticsCategory();
    }

}
